package cn.lanqiao.blog.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cn.lanqiao.blog.entity.Check;
import cn.lanqiao.blog.service.CheckService;
import cn.lanqiao.blog.utils.Result;

@RestController
@RequestMapping("/check")
@CrossOrigin
public class CheckController {
	 
	@Autowired
	private CheckService checkService;
	//是否开启审核
	@RequestMapping("/update")
	
	public Result update(Check check) {
		//@RequestParam("value")
		int a = checkService.updateCheck(check);
		return Result.success(a);
	}
	@RequestMapping("/get")
	public Result get() {
		return Result.success(checkService.getAll());
	}
}
